import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import VueSetupExtend from 'vite-plugin-vue-setup-extend'
import { crx } from '@crxjs/vite-plugin'
import manifest from './manifest.json' assert { type: 'json' } // Node >=17

// https://vitejs.dev/config/
export default defineConfig({
	plugins: [vue(), VueSetupExtend(), crx({ manifest })],
	base: '/',
	css: {
		preprocessorOptions: {
			scss: {
				api: 'modern-compiler', // or 'modern'
			},
		},
	},
	resolve: {
		alias: {
			'@': '/src',
		},
	},
	server: {
    host: 'localhost', // 或 'localhost'
    port: 5173
  }
})
